home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / bbs / testf10.zip / TESTFILE.DOC < prev    next >
Text File  |  1993-01-23  |  2KB  |  76 lines

  1. This is just a small utility that I made up so my callers can view any
  2. compression kept on my BBS.  This program will check the signature of the
  3. archive to determine it's type instead of relying on a suffix.  I normally
  4. only have ARJ on my system, but I figured what the heck, I might as well
  5. include all seven... <g>
  6.  
  7. The following errorlevels will be sent to DOS upon execution:
  8.  
  9.       0 = Unknown archive format
  10.       1 = ARC format
  11.       2 = ARJ format
  12.       3 = LZH format
  13.       4 = PAK format
  14.       5 = SQZ format
  15.       6 = ZIP format
  16.       7 = ZOO format
  17.  
  18. The versions below are the archive utilities that I have tested this with:
  19.  
  20. ARC - Version 6.00 by System Enhancement Associates
  21. ARJ - Version 2.30 by Robert K. Jung
  22. LHA - Version 2.12 by Haruyasu Yoshizaki
  23. PAK - Version 2.51 by NoGate Consulting
  24. SQZ - Version 1.08.2 by J I Hammarberg
  25. ZIP - Version 2.04c by PKWare Inc.
  26. ZOO - Version 2.1 by Rahul Dhesi
  27.  
  28. The calling format for the executable is
  29.  
  30.     TESTFILE {archive}
  31.  
  32. Here is a copy of my PCBVIEW.BAT file:
  33.  
  34. @echo off
  35. testfile %1
  36. if errorlevel == 7 goto zoo
  37. if errorlevel == 6 goto zip
  38. if errorlevel == 5 goto sqz
  39. if errorlevel == 4 goto pak
  40. if errorlevel == 3 goto lzh
  41. if errorlevel == 2 goto arj
  42. if errorlevel == 1 goto arc
  43. if errorlevel == 0 goto error
  44. goto end
  45.  
  46. :arc
  47. arc l %1 > pcbview.txt
  48. goto end
  49.  
  50. :arj
  51. arj l %1 > pcbview.txt
  52. goto end
  53.  
  54. :lha
  55. lha l %1 > pcbview.txt
  56. goto end
  57.  
  58. :pak
  59. pak v %1 > pcbview.txt
  60. goto end
  61.  
  62. :sqz
  63. sqz l %1 > pcbview.txt
  64. goto end
  65.  
  66. :zip
  67. viewzip %1
  68. goto end
  69.  
  70. :zoo
  71. zoo l %1 > pcbview.txt
  72. goto end
  73.  
  74. :error
  75. :end
  76.